package com.example.loginmodule.utils;

import android.content.Context;
import android.os.Bundle;

import com.alibaba.android.arouter.launcher.ARouter;
import com.examination.mlib.constants.ARouterConstants;
import com.examination.mlib.interfaceapi.LoginBackApi;

public class LoginUtils {
    /**
     * android-rn
     * @param context
     * @param pluginId
     * @param componentName
     */
    public static void push(Context context, String pluginId, String componentName){
        LoginBackApi loginBackApi = (LoginBackApi) ARouter.getInstance().build(ARouterConstants.LoginModuleImpl).navigation();
        loginBackApi.Android2RnPush(context,pluginId,componentName);
    }

    /**
     * rn-android
     * @param context
     * @param pluginId
     * @param componentName
     * @param bundle
     */
    public static void push(Context context, String pluginId, String componentName, Bundle bundle){
        LoginBackApi loginBackApi = (LoginBackApi) ARouter.getInstance().build(ARouterConstants.LoginModuleImpl).navigation();
        loginBackApi.Android2RnPush(context,pluginId,componentName,bundle);
    }

}
